<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">
<h:head>
        <title>SignUp</title>
        <link rel="stylesheet" href="css/mycss.css" type="text/css"></link>
    </h:head>
    
    <body style="background-color:#F0FFFF"></body>
    
    <h:body>
        <h:form prependId="false">

            <h4><em><font size="7">Sign Up Form</font></em></h4>
            <br/><br/>
                <h:panelGrid columns="3" id="regGrid" style="position: absolute; left: 460px; top: 150px">
                    
                    <h:outputLabel for="name" style="font: 24px/26px colibri">Name:</h:outputLabel>
                    <p:inputText id="name" value="#{registrationBean.user.name}">
                        <p:ajax update="namemsg"/>
                    </p:inputText>
                    <p:message id="namemsg" for="name" />
                    
                    <h:outputLabel for="surname" style="font: 24px/26px colibri" >Surname:</h:outputLabel>
                    <p:inputText id="surname" value="#{registrationBean.user.surname}">
                        <p:ajax update="surnamemsg"/>
                    </p:inputText>
                    <p:message id="surnamemsg" for="surname" />
                    
                    <h:outputLabel for="city" style="font: 24px/26px colibri">City</h:outputLabel>
                    <p:inputText id="city" value="#{registrationBean.user.city}">
                        <p:ajax update="citymsg"/>
                    </p:inputText>
                    <p:message id="citymsg" for="city" />
                    
                    <h:outputLabel for="email" style="font: 24px/26px colibri">Email:</h:outputLabel>
                    <p:inputText id="email" value="#{registrationBean.user.email}" >
                        <p:ajax update="emailmsg"/>
                    </p:inputText>
                    <p:message id="emailmsg" for="email" />
                    
                    <h:outputLabel for="password" style="font: 24px/26px colibri">Password:</h:outputLabel>
                    <p:password id="password" value="#{registrationBean.user.password}"
                                feedback="true" match="pwd2" label="Password"/>
                    <p:message for="password" />

                    <h:outputLabel for="pwd2" style="font: 24px/26px colibri">Confirm Password:</h:outputLabel>
                    <p:password id="pwd2" label="Confirm Password"/>
                </h:panelGrid>
            <bot1><p:commandButton value="Register" style="background-color:#90A4FD" update="regGrid"
                                       action="#{registrationBean.register()}" /></bot1>
                <bot2><p:button outcome="index" value="Back" style="width:100px;height:38px;background-color:#90A4FD"/></bot2>


        </h:form>
    </h:body>
</html>